'use strict';

// Define some pseudo module globals
var isPro = require('../libs/debug').isPro;
var isDev = require('../libs/debug').isDev;
var isDbg = require('../libs/debug').isDbg;

//
var mongoose = require('mongoose');
mongoose.Promise = global.Promise;

var Schema = mongoose.Schema;

var configSchema = new Schema({
  key: {
    type: String,
    unique: true
  },
  value: mongoose.Schema.Types.Mixed
});

var Config = mongoose.model('Config', configSchema);

exports.Config = Config;
